package com.awanp3.nimbus.wms.fg.domain.bo;

import com.awanp3.nimbus.wms.fg.domain.WmsPoInfo;
import com.awanp3.nimbus.common.core.validate.AddGroup;
import com.awanp3.nimbus.common.core.validate.EditGroup;
import com.awanp3.nimbus.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 采购订单业务对象 wms_po_info
 *
 * @author 20014170
 * @date 2025-09-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = WmsPoInfo.class, reverseConvertGenerate = false)
public class WmsPoInfoBo extends BaseEntity {

    /**
     * 主键
     */
    private Long id;

    /**
     * PO单号
     */
    @NotBlank(message = "PO单号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String poNo;

    /**
     * PO行项目号
     */
    @NotBlank(message = "PO行项目号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String poItem;

    /**
     * 物料号
     */
    @NotBlank(message = "物料号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String materialCode;

    /**
     * 物料描述
     */
    @NotBlank(message = "物料描述不能为空", groups = { AddGroup.class, EditGroup.class })
    private String materialDesc;

    /**
     * 基本单位
     */
    @NotBlank(message = "基本单位不能为空", groups = { AddGroup.class, EditGroup.class })
    private String baseUnit;

    /**
     * 数量
     */
    @NotNull(message = "数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long qty;

    /**
     * 工厂
     */
    @NotBlank(message = "工厂不能为空", groups = { AddGroup.class, EditGroup.class })
    private String plantCode;

    /**
     * 库位
     */
    @NotBlank(message = "库位不能为空", groups = { AddGroup.class, EditGroup.class })
    private String locationCode;

    /**
     * 状态（0正常 1停用）
     */
    @NotBlank(message = "状态（0正常 1停用）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;


}
